package com.example.dml.delegate_pattern;

import java.util.HashMap;
import java.util.Map;

/**
 * @Authors：gaoyang
 * @CreateTime：2021-10-28
 * @Description：todo
 */
public class Leader implements IEmployee{

    private Map<String,IEmployee> target = new HashMap<>();

    public Leader() {
        target.put("加密",new EmployeeA());
        target.put("登录",new EmployeeB());
    }

    //项目经理自己不干活
    @Override
    public void doing(String command) {
        target.get(command).doing(command);
    }
}
